<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<f:view>
	<h:head>
		<title>Login</title>
		<h:outputStylesheet library="css" name="bootstrap.css" />
	</h:head>
	<h:body>
		<div class="modal">
			<div class="modal-header">
				<h3>Login page</h3>
			</div>
			<h:form styleClass="form-horizontal modal-form">
				<div class="modal-body">
					<div class="control-group">
						<h:outputLabel value="User Name:" styleClass="control-label"
							for="inputUsername" />
						<div class="controls">
							<h:inputText id="inputUsername" value="#{loginBean.userName}" />
						</div>
					</div>
					<div class="control-group">
						<h:outputLabel value="Password:" styleClass="control-label"
							for="inputPassword" />
						<div class="controls">
							<h:inputSecret id="inputPassword" value="#{loginBean.password}" />
						</div>
					</div>
					<h:panelGroup class="alert alert-error" style="display:block"
						rendered="#{loginBean.errorMessage != null}">
						<strong>Error occured! </strong>
						<h:outputText value="#{loginBean.errorMessage}" />
					</h:panelGroup>
				</div>
				<div class="modal-footer">
					<h:commandButton value="Login" styleClass="btn btn-primary"
						action="#{loginBean.login}" />
					<h:link value="Register" styleClass="btn" outcome="register" />
				</div>
			</h:form>
		</div>
	</h:body>
</f:view>
</html>